Ext.define('app.view.common.dictionaries.DictionariesCombo', {
	extend : 'Ext.form.field.ComboBox',
	alias : 'widget.dictionariesCombo',
	mode : 'remote',
	triggerAction : 'all',
	valueField : 'id',
	displayField : 'value',
	initComponent : function() {
		var me = this;
		var myStore = Ext.create('Ext.data.Store', {
			proxy : {
				type : 'ajax',
				url : '/extjs/dictionaries/datasource',
				reader : {
					type : 'json',
					rootProperty : 'root'
				}
			},
			autoLoad : true
		});
		this.store = myStore;
		//监听load事件
		myStore.on('load', function(){
		    me.select(myStore.getAt(0));
		});
		me.callParent(arguments);
	}
});